package com.kt.service.imp;

import com.kt.dao.imp.UserDAOImp;
import com.kt.domain.User;
import com.kt.service.UserService;
import com.kt.utils.UtilDB;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;

public class UserServiceImp implements UserService {

    private UserDAOImp userDAOImp = new UserDAOImp();


    public User findUser(String username, String password) {
        return userDAOImp.findUser(username, password);
    }

    public User findByUsername(String username) {
        return userDAOImp.findByUsername(username);
    }

    public User findByPhone(String phone) {
        return userDAOImp.findByPhone(phone);
    }

    public User findByUid(String uid) {
        return userDAOImp.findByUid(uid);
    }

    public int changeUserInfo(User newUser) {
        return userDAOImp.changeUserInfo(newUser);
    }

    public int deleteUser(String username) {
        return userDAOImp.deleteUser(username);
    }

    public int addUser(User user) {
        return userDAOImp.addUser(user);
    }

}
